package com.xjoyt.pay.merchant.register.po;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xjoyt.pay.constants.DateConstant;

/**
 * 代理商
 * 
 * @author Administrator
 *
 */
@Entity
@Table(name = "t_distributor")
public class Distributor {

	/**
	 * ID
	 */
	@Id
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid2")
	@Column(name = "distributor_id", length = 50)
	public String id;

	/**
	 * 法人代表
	 */
	@Column(name = "legal_person", length = 50)
	public String legalPerson;

	/**
	 * 营业执照号
	 */
	@Column(name = "license", length = 50)
	public String license;

	/**
	 * 经营范围
	 */
	@Column(name = "business_operations", length = 255)
	public String businessOperations;

	/**
	 * 手机号
	 */
	@Column(name = "phone", length = 50)
	public String phone;

	/**
	 * 状态(空：未完成注册,1:未审核,2:审核通过,3审核不通过)
	 */
	@Column(name = "status")
	public Integer status;

	/**
	 * 所属公司
	 */
	@Column(name = "company_id", length = 36)
	public String companyId;

	/**
	 * 证件照片
	 */
	@Column(name = "photo", length = 255)
	public String photo;

	/**
	 * 商户名称
	 */
	@Column(name = "`name`", length = 50)
	public String name;

	/**
	 * 客服名称
	 */
	@Column(name = "`service_name`", length = 50)
	public String serviceName;

	/**
	 * 密码
	 */
	@Column(name = "`password`", length = 50)
	public String password;

	/**
	 * 电话
	 */
	@Column(name = "telephone", length = 50)
	public String telephone;

	/**
	 * 客服电话
	 */
	@Column(name = "service_telephone", length = 50)
	public String serviceTelephone;

	/**
	 * 邮箱
	 */
	@Column(name = "email", length = 50)
	public String email;

	/**
	 * 身份证
	 */
	@Column(name = "id_number", length = 50)
	public String idNumber;

	/**
	 * 联行号
	 */
	@Column(name = "bank_code", length = 50)
	public String bankCode;

	/**
	 * 开户行名称
	 */
	@Column(name = "bank", length = 50)
	public String bank;

	/**
	 * 账户名称
	 */
	@Column(name = "card_name", length = 50)
	public String cardName;

	/**
	 * 银行卡号
	 */
	@Column(name = "card_no", length = 50)
	public String cardNo;

	/**
	 * 开户人手机号
	 */
	@Column(name = "card_phone", length = 50)
	public String cardPhone;

	/**
	 * 开户人身份证号
	 */
	@Column(name = "card_id_number", length = 50)
	public String cardIdNumber;

	/**
	 * 账号类型(true:对私账号,false:对公账号)
	 */
	@org.hibernate.annotations.Type(type = "yes_no")
	@Column(name = "is_personal")
	public Boolean personal;

	/**
	 * 银行所在省
	 */
	@Column(name = "bank_province", length = 50)
	public String bankProvince;

	/**
	 * 银行所在时
	 */
	@Column(name = "bank_city", length = 50)
	public String bankCity;

	/**
	 * 所在地
	 */
	@Column(name = "area", length = 50)
	public String area;

	/**
	 * 地址
	 */
	@Column(name = "address", length = 255)
	public String address;

	/**
	 * 入住日期
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "added_date")
	@JsonFormat(pattern = DateConstant.DATE_TIME_FORMAT_PATTERN, timezone = "GMT+8")
	public Date addedDate;

	/**
	 * 上级id
	 */
	@Column(name = "parent_id", length = 36)
	public String parentId;

	/**
	 * 类型(true:企业,false 个人)
	 */
	@org.hibernate.annotations.Type(type = "yes_no")
	@Column(name = "type", length = 20)
	public Boolean type;

	/**
	 * 路径
	 */
	@Column(name = "`path`", length = 5000)
	public String path;
}
